#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<algorithm>
using namespace std;

typedef long long LL;
const int N = 1e5 + 10;
LL n, k;
LL a[N];
LL cal(LL mid)
{
	LL sum = 0;
	for (int i = 1; i <= n; i++)
		sum += a[i] / mid;
	return sum;
}
int main()
{
	cin >> n >> k;
	for (int i = 1; i <= n; i++) cin >> a[i];
	sort(a + 1, a + n + 1);
	LL left = 0, right = 1e8;
	while (left < right)
	{
		LL mid = (left + right + 1)/ 2;
		if (cal(mid) >= k)left = mid;
		else right = mid - 1;
	}
	cout << right << endl;
	return 0;
}
